﻿using System.Net;
using System.Net.Sockets;

namespace FutureTech.Network
{
        /// <summary>
        /// 
        /// </summary>
        public class UdpAsyncContext
        {
                /// <summary>
                /// Initializes a new instance of the <see cref="UdpAsyncContext"/> class.
                /// </summary>
                /// <param name="localPort">The local port.</param>
                public UdpAsyncContext(int localPort)
                {
                        UdpClient = new UdpClient(localPort) {EnableBroadcast = true};
                }

                /// <summary>
                /// Gets the UDP client.
                /// </summary>
                /// <value>
                /// The UDP client.
                /// </value>
                public UdpClient UdpClient { get; private set; }

                /// <summary>
                /// The remote end point
                /// </summary>
                public IPEndPoint RemoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
        }
}
